<script lang="ts" setup>
import { ref } from 'vue';
import { RouterLink, RouterView } from 'vue-router'
import { menu } from './util/index';
const selectedKeys = ref(['1']);

const menuList = ref(menu);
</script>
<template>
  <a-layout>
    <a-layout-header :style="{ position: 'fixed', zIndex: 1, width: '100%' }">
      <div class="logo" />

      <a-menu
        v-model:selectedKeys="selectedKeys"
        theme="dark"
        mode="horizontal"
        :style="{ lineHeight: '64px' }"
      >
        <template v-for="item in menuList" :key="item.key">
          <a-menu-item >
            <router-link :to="item.link">{{ item.name }}</router-link>
          </a-menu-item>
        </template>
      </a-menu>
    </a-layout-header>
    <a-layout-content :style="{ padding: '0 50px', marginTop: '64px' }">

      <div :style="{ background: '#fff', padding: '24px', height: '100%', overflow: 'hidden' }"><RouterView /></div>
    </a-layout-content>
    <a-layout-footer :style="{ textAlign: 'center' }">
      Ant Design ©2018 Created by Ant UED
    </a-layout-footer>
  </a-layout>
</template>

<style>
.ant-layout {
    height: 100vh!important;
}
</style>
